App({
    onLaunch: function() {
        //调用API从本地缓存中获取数据
        var r = wx.getStorageSync("logs") || [];
        r.unshift(Date.now()), wx.setStorageSync("logs", r);
    },
    goLogin: function() {
        wx.showModal({
            title: "儿康欢迎你",
            content: "请先前往登录",
            success: function(r) {
                r.confirm ? wx.switchTab({
                    url: "../../pages/message/index"
                }) : r.cancel;
            }
        });
    },
    getUserInfo: function(r) {
        var e = this;
        this.globalData.userInfo ? "function" == typeof r && r(this.globalData.userInfo) : wx.login({
            success: function() {
                wx.getUserInfo({
                    success: function(t) {
                        e.globalData.userInfo = t.userInfo, "function" == typeof r && r(e.globalData.userInfo);
                    }
                });
            }
        });
    },
    globalData: {
        userInfo: null,
        urlBase: "https://www.zyekzx.com/ek/m/",
        baseUrl: "https://www.zyekzx.com/ek/",
        // urlBase: 'http://ray1.vipgz1.idcfengye.com/ek/m/',
        // baseUrl: 'http://ray1.vipgz1.idcfengye.com/ek/',
        urlCode2openId: "loginCheck",
        urlCheckUser: "checkUser",
        urlCheckUser2: "m/checkUser2",
        urlIndex: "index/init",
        //商家列表
        urlStoreList: "index/storeList",
        //商家预约时间
        urlStoreYuYueTime: "storeYuYueTime",
        //活动列表
        urlactivityList: "activity/init",
        urlactivityPay: "activity/beforePay",
        urlactivitydetailList: "activity/activityDetail",
        urlactivitydetail: "activity/detail",
        urlactivityOrderList: "m/order/activityOrderList",
        //项目列表
        urlCateList: "storeGoods/cateList",
        //添加订单
        urlAddServeOrder: "order/addServerOrder",
        urlServeOrderBeforePay: "storeGoods/beforePay",
        urlServerOrderList: "order/serverOrderList",
        urlAddRechargeOrder: "order/addCardOrder",
        urlAddGoodsOrder: "order/addGoodsOrder",
        urlAddTuanOrder: "order/addGroupOrder",
        urlAddActivityOrder: "order/addActivityOrder",
        //商城
        urlGoodsList: "goods/goodsList",
        urlGoodsDetail: "goods/goodsDetail",
        urlDefaultAddress: "address/defaultAddress",
        urlAddressList: "address/addressList",
        urlUpdateAddress: "address/updateAddress",
        urlDelAddress: "address/del",
        urlCancleOrder: "order/upateState",
        urlMallOrderDetail: "order/goodsOrderDetail/",
        urlGoodsOrderList: "m/order/goodsOrderList",
        //支付
        urlPayData: "order/pay/",
        //会员卡
        urlRechargrList: "/m/recharge/init",
        urlRechargrDetail: "recharge/rechargeDetail",
        urlRechargrRecord: "https://www.zyekzx.com/m/vipCard/cardLogList",
        urlRechargrbd: "https://www.zyekzx.com/m/vipCard/bindVipCard",
        urlMyRechargr: "https://www.zyekzx.com/m/vipCard/vipCardList",
        urlStoreRechargr: "https://www.zyekzx.com/m/vipCard/storeVipCardXcxList",
        interRechargrDetail: "https://www.zyekzx.com/m/vipCard/detail",
        urlAddCardOrder: "m/order/addCardOrder",
        //团购列表
        urlgGroupOrderList: "m/order/groupOrderList",
        urlGrupInit: "group/init",
        urlGrupDetail: "group/groupDetail",
        urlDetail: "group/detail",
        urlShareTile: "儿康",
        urlInvite: "activity/activityDetailByUser",
        urlkan: "m/activity/kanGoods",
        urlKanDetail: "m/activity/kanDetail",
        urlQiang: "m/activity/quickGoods",
        //按钮砍价接口
        urlBtnKan: "m/order/kan",
        urlBrandsStory: "m/storeContent",
        urlPay: "m/order/pay",
        //优惠
        urlAddNormalOrder: "m/order/addNormalOrder",
        urlMyCoupon: "m/order/myCoupon",
        urlStoreDetail: "m/storeDetail",
        urlNewCateList: "m/news/cateList",
        urlNewsList: "m/news/newsList",
        urlNewsDetail: "m/news/detail",
        nickName: "",
        avatarUrl: "",
        userId: "",
        phone: "",
        storeId: "",
        lng: "",
        lat: "",
        ekStoreId: "",
        activityType: "",
        // 预约信息
        serverId: "",
        yuyueTime: "",
        serBegintime: "",
        serEndtime: "",
        cartList: [],
        
        //预约详情信息
        serDetail: {},

        ctData: {},

        //订单信息
        goodsId: "",
        addressId: "",
        //优惠券Id(红包)
        couponId: ""
    }
});